//
//  CNGuestView.m
//  chuiniu
//
//  Created by zheng ji on 14-8-2.
//  Copyright (c) 2014年 jxw. All rights reserved.
//

#import "CNGuestView.h"
@interface CNGuestView(){
    UIImageView* _imageViewAllow;
    UILabel* _lblGuess;
}
@end

@implementation CNGuestView

- (id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self initUI];
    }
    return self;
}
-(void)initUI{
    self.backgroundColor=[UIColor clearColor];
    _imageViewAllow=[[UIImageView alloc]initWithImage:[UIImage imageNamed:@"arrow_right.png"]];
    _imageViewAllow.frame=CGRectMake(0, 0, 20, self.frame.size.height);
    _imageViewAllow.backgroundColor=[UIColor clearColor];
    [self addSubview:_imageViewAllow];
    
      _lblGuess=[[UILabel alloc]initWithFrame:CGRectMake(_imageViewAllow.frame.size.width, 0 , self.frame.size.width - _imageViewAllow.frame.size.width, self.frame.size.height)];
    
    _lblGuess.text=@"";
    _lblGuess.backgroundColor=[UIColor clearColor];
    
    [_lblGuess setTextColor:[UIColor whiteColor]];
    
    [self addSubview:_lblGuess];
}
-(void)showGuessText:(NSString*)text{
    _lblGuess.text=text;
}
-(void)showArrow:(BOOL)show{
    _imageViewAllow.hidden=!show;
}
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect
{
    // Drawing code
}
*/

@end
